/* 状态管理演示组件样式 */
.state-management-demo {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 头部样式 */
.demo-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #667eea;
}

.demo-header h2 {
  color: #667eea;
  margin-bottom: 10px;
  font-size: 1.8em;
}

.demo-header p {
  color: #666;
  margin-bottom: 15px;
}

.demo-header code {
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

.refresh-button {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.refresh-button:hover {
  background: #5a6fd8;
}

/* 标签页样式 */
.demo-tabs {
  display: flex;
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab {
  flex: 1;
  padding: 15px 20px;
  background: #f8f9fa;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  border-right: 1px solid #e9ecef;
}

.tab:last-child {
  border-right: none;
}

.tab.active {
  background: #667eea;
  color: white;
}

.tab:hover:not(.active) {
  background: #e9ecef;
}

/* 加载和空状态 */
.state-demo-loading,
.state-demo-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.2em;
}

/* 总览页面样式 */
.overview-tab {
  padding: 20px 0;
}

.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.old-format,
.new-format {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.old-format {
  border-left: 5px solid #e74c3c;
}

.new-format {
  border-left: 5px solid #27ae60;
}

.old-format h3 {
  color: #e74c3c;
  margin-bottom: 15px;
}

.new-format h3 {
  color: #27ae60;
  margin-bottom: 15px;
}

.code-block {
  background: #2d3748;
  color: #e2e8f0;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 15px;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  line-height: 1.4;
}

.problem-note {
  background: #ffeaa7;
  border-left: 4px solid #e17055;
  padding: 10px 15px;
  border-radius: 4px;
  color: #d63031;
  font-weight: 500;
}

.advantage-note {
  background: #d1f2eb;
  border-left: 4px solid #00b894;
  padding: 10px 15px;
  border-radius: 4px;
  color: #00b894;
  font-weight: 500;
}

/* 执行状态页面样式 */
.execution-tab {
  padding: 20px 0;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.status-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.status-card:hover {
  transform: translateY(-2px);
}

.status-label {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 10px;
}

.status-value {
  font-size: 1.3em;
  font-weight: bold;
  color: #333;
}

.status-value.completed,
.status-value.success {
  color: #27ae60;
}

.status-value.running {
  color: #f39c12;
}

.status-value.failed,
.status-value.error {
  color: #e74c3c;
}

.error-card {
  background: #ffebee;
  border: 1px solid #e74c3c;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}

.error-card h4 {
  color: #e74c3c;
  margin-bottom: 10px;
}

/* 业务数据页面样式 */
.business-tab {
  padding: 20px 0;
}

.business-section {
  margin-bottom: 30px;
}

.business-section h4 {
  color: #667eea;
  margin-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 8px;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.result-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-item .label {
  color: #666;
}

.result-item .value {
  font-weight: bold;
  color: #333;
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9em;
}

.document-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.document-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.document-path {
  font-size: 0.8em;
  color: #666;
  margin-top: 5px;
  font-family: 'Courier New', monospace;
}

/* 节点详情页面样式 */
.nodes-tab {
  padding: 20px 0;
}

.node-detail-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.node-header h4 {
  color: #333;
  margin: 0;
}

.node-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: bold;
}

.node-status.completed,
.node-status.success {
  background: #d1f2eb;
  color: #00b894;
}

.node-status.running {
  background: #fcf3cf;
  color: #f39c12;
}

.node-status.failed,
.node-status.error {
  background: #fadbd8;
  color: #e74c3c;
}

.node-status.pending {
  background: #e8f4f8;
  color: #3498db;
}

.node-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.execution-info,
.business-info {
  background: white;
  border-radius: 8px;
  padding: 15px;
}

.execution-info h5,
.business-info h5 {
  margin-bottom: 15px;
  color: #667eea;
}

.info-grid,
.business-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-grid div,
.business-grid div {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9em;
}

.info-grid div:last-child,
.business-grid div:last-child {
  border-bottom: none;
}

.error-info {
  background: #ffebee;
  border: 1px solid #e74c3c;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
  color: #e74c3c;
  font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .comparison-container {
    grid-template-columns: 1fr;
  }
  
  .node-content {
    grid-template-columns: 1fr;
  }
  
  .demo-tabs {
    flex-direction: column;
  }
  
  .tab {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
  }
  
  .tab:last-child {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .state-management-demo {
    margin: 10px;
    padding: 15px;
  }
  
  .status-grid {
    grid-template-columns: 1fr;
  }
  
  .result-summary {
    grid-template-columns: 1fr;
  }
} 